<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.1.1">
<meta name="baidu-site-verification" content="code-hkfwkpUecU" />
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">
  <meta name="baidu-site-verification" content="true">

<link rel="stylesheet" href="/css/main.css">

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto+Slab:300,300italic,400,400italic,700,700italic|PT+Mono:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.14.0/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">

<script class="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"github.com","root":"/","scheme":"Gemini","version":"8.0.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":true,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"disqus","storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}};
  </script>

  <meta name="description" content="CSS选择器 常用的CSS选择器    选择器 语法 描述 示例    标签选择器 E{ CSS规则 } 以文档元素作为选择符 td{ font-size：14px; }   ID选择器 #ID{ css规则 } 以文档元素的class作为选择符 div.note{ font-size: 14px; }   群组选择器 E1，E2，E3{ CSS规则 } 多个选择符应用同样的样式规则 td，p，d">
<meta property="og:type" content="article">
<meta property="og:title" content="‘jQuery选择器&#39;">
<meta property="og:url" content="https://github.com/shanlu123/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/index.html">
<meta property="og:site_name" content="shanlu的博客">
<meta property="og:description" content="CSS选择器 常用的CSS选择器    选择器 语法 描述 示例    标签选择器 E{ CSS规则 } 以文档元素作为选择符 td{ font-size：14px; }   ID选择器 #ID{ css规则 } 以文档元素的class作为选择符 div.note{ font-size: 14px; }   群组选择器 E1，E2，E3{ CSS规则 } 多个选择符应用同样的样式规则 td，p，d">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-11-21T16:00:00.000Z">
<meta property="article:modified_time" content="2020-12-07T07:12:38.591Z">
<meta property="article:author" content="shanlu">
<meta property="article:tag" content="《锋利的jQuery》">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://github.com/shanlu123/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/">


<script class="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>‘jQuery选择器' | shanlu的博客</title>
  






  <noscript>
  <style>
  body { margin-top: 2rem; }

  .use-motion .menu-item,
  .use-motion .sidebar,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header {
    visibility: visible;
  }

  .use-motion .header,
  .use-motion .site-brand-container .toggle,
  .use-motion .footer { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle,
  .use-motion .custom-logo-image {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line {
    transform: scaleX(1);
  }

  .search-pop-overlay, .sidebar-nav { display: none; }
  .sidebar-panel { display: block; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>
  <a href="https://github.com/shanlu123" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">shanlu的博客</h1>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">三餐四季，冷暖自知</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/home" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-前端">

    <a href="/%E5%89%8D%E7%AB%AF/" rel="section"><i class="fa fa-cloud fa-fw"></i>前端</a>

  </li>
        <li class="menu-item menu-item-生活">

    <a href="/%E7%94%9F%E6%B4%BB/" rel="section"><i class="fa fa-user fa-fw"></i>生活</a>

  </li>
        <li class="menu-item menu-item-school">

    <a href="/school/" rel="section"><i class="fa fa-graduation-cap fa-fw"></i>学校</a>

  </li>
        <li class="menu-item menu-item-tree_hole">

    <a href="/tree_hole/" rel="section"><i class="fa fa-tree fa-fw"></i>树洞</a>

  </li>
        <li class="menu-item menu-item-photos">

    <a href="/photos/" rel="section"><i class="fa fa-camera fa-fw"></i>相册</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <section class="post-toc-wrap sidebar-panel">
          <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">1.</span> <span class="nav-text">CSS选择器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#jQuery%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">2.</span> <span class="nav-text">jQuery选择器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#jQuery%E9%80%89%E6%8B%A9%E5%99%A8%E4%BC%98%E5%8A%BF%EF%BC%9A"><span class="nav-number">3.</span> <span class="nav-text">jQuery选择器优势：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9F%BA%E6%9C%AC%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">4.</span> <span class="nav-text">基本选择器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%B1%82%E6%AC%A1%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">5.</span> <span class="nav-text">层次选择器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%BF%87%E6%BB%A4%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">6.</span> <span class="nav-text">过滤选择器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%A1%A8%E5%8D%95%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">7.</span> <span class="nav-text">表单选择器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%80%89%E6%8B%A9%E5%99%A8%E4%B8%AD%E7%9A%84%E4%B8%80%E4%BA%9B%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9"><span class="nav-number">8.</span> <span class="nav-text">选择器中的一些注意事项</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%85%B6%E4%BB%96%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-number">9.</span> <span class="nav-text">其他选择器</span></a></li></ol></div>
      </section>
      <!--/noindex-->

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="shanlu"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">shanlu</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">127</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/shanlu123" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;shanlu123"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.cnblogs.com/shanlu0000/p/11478994.html" title="博客园 → https:&#x2F;&#x2F;www.cnblogs.com&#x2F;shanlu0000&#x2F;p&#x2F;11478994.html" rel="noopener" target="_blank"><i class="fa fa-blog fa-fw"></i>博客园</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:yourname@gmail.com" title="E-Mail → mailto:yourname@gmail.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://weibo.com/u/6662419816/home?wvr=5" title="微博 → https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;6662419816&#x2F;home?wvr&#x3D;5" rel="noopener" target="_blank"><i class="fab fa-weibo fa-fw"></i>微博</a>
      </span>
  </div>


  <div class="links-of-blogroll animated">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      友情链接
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://www.npmjs.com/" title="https:&#x2F;&#x2F;www.npmjs.com&#x2F;" rel="noopener" target="_blank">npm</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.bilibili.com/" title="https:&#x2F;&#x2F;www.bilibili.com&#x2F;" rel="noopener" target="_blank">bilibili</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://stackoverflow.com/" title="https:&#x2F;&#x2F;stackoverflow.com&#x2F;" rel="noopener" target="_blank">stackoverflow</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://developers.weixin.qq.com/miniprogram/dev/component/" title="https:&#x2F;&#x2F;developers.weixin.qq.com&#x2F;miniprogram&#x2F;dev&#x2F;component&#x2F;" rel="noopener" target="_blank">小程序</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="http://www.ruanyifeng.com/blog/" title="http:&#x2F;&#x2F;www.ruanyifeng.com&#x2F;blog&#x2F;" rel="noopener" target="_blank">阮一峰</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://cn.aliyun.com/" title="https:&#x2F;&#x2F;cn.aliyun.com&#x2F;" rel="noopener" target="_blank">阿里云</a>
        </li>
    </ul>
  </div>

      </section>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">
      

      

    
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://github.com/shanlu123/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="shanlu">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="shanlu的博客">
    </span>

    
    
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          ‘jQuery选择器'
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2020-11-22 00:00:00" itemprop="dateCreated datePublished" datetime="2020-11-22T00:00:00+08:00">2020-11-22</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2020-12-07 15:12:38" itemprop="dateModified" datetime="2020-12-07T15:12:38+08:00">2020-12-07</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0-%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/" itemprop="url" rel="index"><span itemprop="name">读书笔记--《锋利的jQuery》</span></a>
        </span>
    </span>

  
    <span id="/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/" class="post-meta-item leancloud_visitors" data-flag-title="‘jQuery选择器'" title="阅读次数">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span class="leancloud-visitors-count"></span>
    </span>
    <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="far fa-comment"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>4.5k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>4 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h3 id="CSS选择器"><a href="#CSS选择器" class="headerlink" title="CSS选择器"></a>CSS选择器</h3><ol>
<li><p>常用的CSS选择器</p>
<table>
<thead>
<tr>
<th>选择器</th>
<th>语法</th>
<th>描述</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td>标签选择器</td>
<td>E{ CSS规则 }</td>
<td>以文档元素作为选择符</td>
<td>td{ font-size：14px; }</td>
</tr>
<tr>
<td>ID选择器</td>
<td>#ID{ css规则 }</td>
<td>以文档元素的class作为选择符</td>
<td>div.note{ font-size: 14px; }</td>
</tr>
<tr>
<td>群组选择器</td>
<td>E1，E2，E3{ CSS规则 }</td>
<td>多个选择符应用同样的样式规则</td>
<td>td，p，div.a { font-size：14px; }</td>
</tr>
<tr>
<td>后代选择器</td>
<td>E F{ CSS规则 }</td>
<td>元素E的任意后代元素F</td>
<td>#links  a { color：red; }</td>
</tr>
<tr>
<td>通配选择器</td>
<td>* { css 规则 }</td>
<td>以文档的所有元素作为选择符</td>
<td>* { font-size：14px; }</td>
</tr>
<tr>
<td>伪类选择器</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>子选择器</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>临近选择器</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>属性选择器</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
</li>
<li><p>把CSS应用到网页中有3种方式：行间样式表、内部样式表、外部样式表</p>
</li>
<li><p>主流浏览器并非完全支持所有的CSS选择器</p>
</li>
</ol>
<h3 id="jQuery选择器"><a href="#jQuery选择器" class="headerlink" title="jQuery选择器"></a>jQuery选择器</h3><ol>
<li><p>jQuery选择器完全继承了CSS的风格，使用jQuery选择器无需担心浏览器是否支持这一选择器。</p>
</li>
<li><p>jQuery选择器的写法与CSS选择器非常相似，CSS选择器找到元素后通常是添加样式，而jQuery选择器找到元素后通常是添加行为。</p>
<blockquote>
<p>CSS获取元素添加事件：</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.demo&#123;  <span class="regexp">//</span>给<span class="class"><span class="keyword">class</span>为<span class="title">demo</span>的元素添加样式</span></span><br><span class="line">	....</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
<blockquote>
<p>jQuery获取元素添加行为：</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">&quot;.demo&quot;</span> &#123;  <span class="regexp">//</span>给<span class="class"><span class="keyword">class</span>为<span class="title">demo</span>的元素添加行为</span></span><br><span class="line">	.....</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure>


</blockquote>
</li>
<li><p>jQuery中涉及CSS样式的部分比单纯的CSS功能更加强大，并拥有跨浏览器的兼容性。</p>
</li>
</ol>
<h3 id="jQuery选择器优势："><a href="#jQuery选择器优势：" class="headerlink" title="jQuery选择器优势："></a>jQuery选择器优势：</h3><ol>
<li><p>简洁的写法：</p>
<ul>
<li>$(“#id”) 用来代替 document.getElementById() 函数</li>
<li>$(“tagName”) 用来代替 document.getElementsVByTagName() 函数</li>
</ul>
</li>
<li><p>支持CSS1到CSS3选择器</p>
<ul>
<li>jQuery选择器支持CSS1，CSS2,的全部选择器和CSS3的部分选择器，同时它自己也有少量独有的选择器</li>
</ul>
</li>
<li><p>完善的处理机制</p>
<ul>
<li><p>使用jQuery选择器不仅比使用传统的getElementById() 和 getElementsByTagName() 函数简洁，而且还能避免某些错误</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span>&gt;</span>test<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="javascript">    <span class="built_in">document</span>.getElementById(<span class="string">&quot;demo&quot;</span>).style.color=<span class="string">&quot;red&quot;</span> </span></span><br><span class="line"><span class="javascript">    <span class="comment">//Uncaught TypeError: Cannot read property &#x27;style&#x27; of null</span></span></span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>上面的代码，浏览器会报错，因为网页中没有 id 为 demo 的元素</p>
</blockquote>
<p>改进后为：</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span>&gt;</span>test<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="javascript">  	<span class="keyword">if</span>(<span class="built_in">document</span>.getElementById(<span class="string">&quot;demo&quot;</span>))&#123;</span></span><br><span class="line"><span class="javascript">  		<span class="built_in">document</span>.getElementById(<span class="string">&quot;demo&quot;</span>).style.color=<span class="string">&quot;red&quot;</span> </span></span><br><span class="line">  	&#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>这样可以避免浏览器报错，但需要操作的元素很多</p>
</blockquote>
</li>
<li><p>jQuery获取网页中不存在的元素不会报错</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span>&gt;</span>test<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="javascript">	$(<span class="string">&quot;#demo&quot;</span>).css(<span class="string">&quot;color&quot;</span>,<span class="string">&quot;red&quot;</span>); <span class="comment">//这里无需判断$(&quot;#demo&quot;)是否存在</span></span></span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>这个预防措施，及时以后因为某种原因删除网页上某个以前使用过的元素，也不用担心这个网页的JavaScript代码会报错。</p>
</blockquote>
</li>
<li><p>需要注意的是，$(“#demo”) 获取的永远是对象，即使网页上没有这个元素</p>
<blockquote>
<p>当用jQuery检查某个元素在网页上是否存在时，不能使用以下代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span>&gt;</span>test<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="javascript">   <span class="keyword">if</span>($(<span class="string">&quot;#demo&quot;</span>))&#123;</span></span><br><span class="line"><span class="javascript">      <span class="built_in">console</span>.log(<span class="string">&#x27;aaa&#x27;</span>);</span></span><br><span class="line">   &#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>页面中没有 id 为demo的元素，依然会打印出 aaa</p>
</blockquote>
<blockquote>
<p>而应该根据获取到的元素的长度来判断：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span>&gt;</span>test<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="javascript">   <span class="keyword">if</span>($(<span class="string">&quot;#demo&quot;</span>).length&gt;<span class="number">0</span>)&#123;</span></span><br><span class="line"><span class="javascript">      <span class="built_in">console</span>.log(<span class="string">&quot;bbb&quot;</span>);</span></span><br><span class="line">   &#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>页面中没有 id 为 demo 的元素，不打印 bbb</p>
</blockquote>
<blockquote>
<p>或者转化为DOM对象来判断</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span>&gt;</span>test<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="javascript">   <span class="keyword">if</span>($(<span class="string">&quot;#demo&quot;</span>)[<span class="number">0</span>])&#123;</span></span><br><span class="line"><span class="javascript">       <span class="built_in">console</span>.log(<span class="string">&quot;ccc&quot;</span>);</span></span><br><span class="line">   &#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
</ol>
<h3 id="基本选择器"><a href="#基本选择器" class="headerlink" title="基本选择器"></a>基本选择器</h3><blockquote>
<p>jQuery中最常用，最简单的选择器，通过元素id，class 和标签名等来查找DOM元素</p>
</blockquote>
<blockquote>
<table>
<thead>
<tr>
<th>选择器</th>
<th>描述</th>
<th>返回</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td>#id</td>
<td>根据给定的id匹配一个元素</td>
<td>单个元素</td>
<td>$(“#test”) ：选取id为test的元素</td>
</tr>
<tr>
<td>.class</td>
<td>根据给定的类名匹配一个元素</td>
<td>集合元素</td>
<td>$(“.test”)：选取 class为test的元素</td>
</tr>
<tr>
<td>element</td>
<td>根据给定的元素名匹配元素</td>
<td>集合元素</td>
<td>$(“p”) ：选取所有的p元素</td>
</tr>
<tr>
<td>*</td>
<td>匹配所有元素</td>
<td>集合元素</td>
<td>$(“*”)：选取所有的元素</td>
</tr>
<tr>
<td>selector1，selector2，……</td>
<td>将每一个选择器匹配到的元素合并后一起返回</td>
<td>集合元素</td>
<td>$(“div，span，p.myClass”)：选取所有 div，span，和class为myClass的p标签元素。</td>
</tr>
</tbody></table>
</blockquote>
<h3 id="层次选择器"><a href="#层次选择器" class="headerlink" title="层次选择器"></a>层次选择器</h3><blockquote>
<table>
<thead>
<tr>
<th>选择器</th>
<th>描述</th>
<th>返回</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td>$(“ancestor  descendant”)</td>
<td>选取ancestor元素里的所有descendant(后代)元素</td>
<td>集合元素</td>
<td>$(“div span”)：选取div里的所有span元素</td>
</tr>
<tr>
<td>$(“parent&gt;child”)</td>
<td>选取parent元素下的子元素，与后代元素有区别</td>
<td>集合元素</td>
<td>$(“div&gt;span”)：选取div元素下元素名是span的子元素(直接子元素)</td>
</tr>
<tr>
<td>$(“prev+next”)</td>
<td>选取紧接在prev元素后的next元素</td>
<td>集合元素</td>
<td>$(“.one+div”)：选取class为one元素的下一个div元素</td>
</tr>
<tr>
<td>$(“prev~siblings”)</td>
<td>选取prev元素之后的所有siblings元素</td>
<td>集合元素</td>
<td>$(“#two~div”)：选取id为two的元素后面的所有div兄弟元素</td>
</tr>
</tbody></table>
</blockquote>
<blockquote>
<ul>
<li>第一个和第二个比较常用，后面两个jQuery中有更简单的方式代替。</li>
<li>next()方法代替$(“prev+next”) 选择器，即 $(“.one+div”) = $(“.one”).next(“div”)</li>
<li>nextAll() 方法代替$(“prev<del>siblings”)选择器，即$(“#two</del>div”) = $(“#two”).nextAll(“div”)，选择#two元素后面的同辈div元素</li>
<li>siblings() 方法与前后位置无关，只要是同辈结点都匹配，如，$(“#two”).siblings(“div”);</li>
</ul>
</blockquote>
<h3 id="过滤选择器"><a href="#过滤选择器" class="headerlink" title="过滤选择器"></a>过滤选择器</h3><ol>
<li><p>主要是通过特定的过滤规则来筛选出DOM元素，过滤规则与CSS中的伪类选择器语法相同，都以一个冒号：开头</p>
</li>
<li><p>按照不同的过滤规则，可以分为基本过滤，内容过滤，可见性过滤，属性过滤，子元素过滤，表单对象属性过滤</p>
</li>
<li><p>基本过滤选择器</p>
<blockquote>
<table>
<thead>
<tr>
<th>选择器</th>
<th>描述</th>
<th>返回</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td>:first</td>
<td>选取第一个元素</td>
<td>单个元素</td>
<td>$(“div:first”)：选取所有div元素中的第一个div元素</td>
</tr>
<tr>
<td>:last</td>
<td>选取最后一个元素</td>
<td>单个元素</td>
<td>$(“div:last”)：选取所有div元素中的最后一个div元素</td>
</tr>
<tr>
<td>:not(selector)</td>
<td>去除所有与给定选择器匹配的元素</td>
<td>集合元素</td>
<td>$(“input:not(.myClass)”)：选取class不是myClass的input元素</td>
</tr>
<tr>
<td>:even</td>
<td>选取索引是偶数的所有元素，索引从0开始</td>
<td>集合元素</td>
<td>$(“input:even”)：选取索引是偶数的input元素</td>
</tr>
<tr>
<td>:odd</td>
<td>选取索引是奇数的所有元素，索引从0开始</td>
<td>集合元素</td>
<td>$(“input:odd”)：选取索引是奇数的input元素</td>
</tr>
<tr>
<td>:eq(index)</td>
<td>选取索引等于index的元素，index从0开始</td>
<td>单个元素</td>
<td>$(“input:eq(1)”)：选取索引是1的input元素</td>
</tr>
<tr>
<td>:gt(index)</td>
<td>选取索引大于index的元素，index从0开始</td>
<td>集合元素</td>
<td>$(“input:gt(1)”)：选取索引大于1的input元素</td>
</tr>
<tr>
<td>:lt(index)</td>
<td>选取索引小于index的元素，index从0开始</td>
<td>集合元素</td>
<td>$(“input:lt(1)”)：选取索引小于1的input元素</td>
</tr>
<tr>
<td>:header</td>
<td>选取所有标题元素，如h1,h2,h3</td>
<td>集合元素</td>
<td>$(“:header”)：选取网页中所有的 h1，h2，h3….元素</td>
</tr>
<tr>
<td>:animated</td>
<td>选取当前正在执行动画的所有元素</td>
<td>集合元素</td>
<td>$(“div:animated”)：选取正在执行动画的div元素</td>
</tr>
</tbody></table>
</blockquote>
</li>
<li><p>内容过滤选择器</p>
<blockquote>
<p>过滤规则主要体现在它所包含的子元素或文本内容上</p>
<table>
<thead>
<tr>
<th>选择器</th>
<th>描述</th>
<th>返回</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td>:contains(text)</td>
<td>选取含有文本内容为“text”的元素</td>
<td>集合元素</td>
<td>$(“div:contains(‘我’)”)：选取含有文本”我“的div元素</td>
</tr>
<tr>
<td>:empty</td>
<td>选取不包含子元素或者文本的空元素</td>
<td>集合元素</td>
<td>$(“div:empty”)：选取不包含子元素（包括文本元素）的div空元素</td>
</tr>
<tr>
<td>:has(selector)</td>
<td>选取含有选择器所匹配的元素的元素</td>
<td>集合元素</td>
<td>$(“div:has(p)”)：选取含有p元素的div元素</td>
</tr>
<tr>
<td>:parent</td>
<td>选取含有子元素或者文本元素的元素</td>
<td>集合元素</td>
<td>$(“div:parent”)：选取拥有子元素（包括文本元素）的div元素</td>
</tr>
</tbody></table>
</blockquote>
</li>
<li><p>可见性过滤选择器</p>
<blockquote>
<p>根据元素的可见和不可见的状态来选择相应的元素</p>
<table>
<thead>
<tr>
<th>选择器</th>
<th>描述</th>
<th>返回</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td>:hidden</td>
<td>选取所有不可见的元素</td>
<td>集合元素</td>
<td>$(“:hidden”)：所有不可见的元素。包括 &lt;input type=”hidden”‘&gt;，&lt;div style=”display:none;”‘&gt;  和 &lt;div sytle=”visibility:hidden;”‘&gt; 等元素，如果只想选取input 元素，可以使用 $(“input:hidden”)</td>
</tr>
<tr>
<td>:visiblie</td>
<td>选取所有可见的元素</td>
<td>集合元素</td>
<td>$(“div:visible”) ：选取所有可见的 div 元素</td>
</tr>
</tbody></table>
<p>注意选择器：hidden，它不仅包括样式属性 display为”none”的元素，也包括文本域 input type=”hidden” 和 visibility：hidden之类的元素</p>
</blockquote>
</li>
<li><p>属性过滤选择器</p>
<blockquote>
<p>过滤规则是通过元素的属性来获取相应的元素</p>
<table>
<thead>
<tr>
<th>选择器</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody><tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
</blockquote>
</li>
<li><p>子元素过滤选择器</p>
</li>
<li><p>表单对象过滤选择器</p>
</li>
</ol>
<h3 id="表单选择器"><a href="#表单选择器" class="headerlink" title="表单选择器"></a>表单选择器</h3><h3 id="选择器中的一些注意事项"><a href="#选择器中的一些注意事项" class="headerlink" title="选择器中的一些注意事项"></a>选择器中的一些注意事项</h3><ol>
<li>属性选择器的引号问题</li>
<li></li>
</ol>
<h3 id="其他选择器"><a href="#其他选择器" class="headerlink" title="其他选择器"></a>其他选择器</h3>
    </div>

    
    
    

    
      <div>
       <div>
  
    <div style="text-align:center;color:#bfbfbf;font-size:16px;">
      <span>-------- 本文结束 </span>
      <i class="fa fa-snowflake-o"></i>
      <span> 感谢阅读 --------</span>
    </div>
  
</div>
      </div>
    

    <footer class="post-footer">
          <div class="reward-container">
  <div></div>
  <button onclick="document.querySelector('.post-reward').classList.toggle('active');">
    赞赏
  </button>
  <div class="post-reward">
      <div>
        <img src="/images/wechatpay.png" alt="shanlu 微信">
        <span>微信</span>
      </div>

  </div>
</div>

          <div class="post-tags">
              <a href="/tags/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/" rel="tag"><i class="fa fa-tag"></i> 《锋利的jQuery》</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2020/11/21/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/code/%E7%AC%AC%E4%B8%80%E7%AB%A0/jquery%E5%BA%93%E5%9C%A8%E6%8C%89%E5%85%B6%E4%BB%96%E5%BA%93%E4%B9%8B%E5%89%8D%E5%AF%BC%E5%85%A5/" rel="prev" title="">
                  <i class="fa fa-chevron-left"></i> 
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/code/%E7%AC%AC%E4%B8%80%E7%AB%A0/jQuery%E9%80%89%E6%8B%A9%E5%99%A8/" rel="next" title="">
                   <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
  
  
  



      
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      const commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

    </div>
  </main>

  <footer class="footer">
    <div class="footer-inner">
      

      

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">shanlu</span>
</div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
    <span title="站点总字数">225k</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">3:25</span>
  </span>
</div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>


    <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

    </div>
  </footer>

  
  <script size="300" alpha="0.6" zIndex="-1" src="//cdn.jsdelivr.net/npm/ribbon.js@1.0.2/dist/ribbon.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/animejs@3.2.0/lib/anime.min.js"></script>
<script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script>

  
  <script>
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      bp.src = (curProtocol === 'https') ? 'https://zz.bdstatic.com/linksubmit/push.js' : 'http://push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();
  </script>




  <script src="/js/local-search.js"></script>















  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>








  

  
<script>
NexT.utils.loadComments('#valine-comments', () => {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js', () => {
    new Valine(Object.assign({
      el  : '#valine-comments',
      path: "/2020/11/22/%E3%80%8A%E9%94%8B%E5%88%A9%E7%9A%84jQuery%E3%80%8B/2.1jQuery%E9%80%89%E6%8B%A9%E5%99%A8/",
    }, {"enable":true,"appId":"M0TTE46ti90I3BUUJqD5WYyD-gzGzoHsz","appKey":"UelegRsJXosPYDakAbUdO5e8","notify":true,"verify":false,"placeholder":"留下评论吧","avatar":"mm","meta":["nick","mail","link"],"pageSize":10,"lang":"zh-cn","visitor":true,"comment_count":true,"recordIP":false,"serverURLs":null,"enableQQ":false,"requiredFields":[]}
    ));
  }, window.Valine);
});
</script>

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/shizuku.model.json"},"display":{"position":"left","width":225,"height":450},"mobile":{"show":true},"react":{"opacity":0.7},"log":false});</script></body>
</html>
